import Vue from 'vue'
import App from './App'
import share from './until/mapShare.js'
Vue.config.productionTip = false
const handler = (e) => {
	e.preventDefault
}
Vue.directive('roll', {
	componentUpdated(el, binding) {
		if (binding.value) {
			document.getElementsByTagName('body')[0].addEventListener('touchmove', handler, {
				passive: false
			})
		} else {
			document.getElementsByTagName('body')[0].removeEventListener('touchmove', handler, {
				passive: false
			})
		} 
	}
})
// 让app.vue中的onLaunched请求完成后再获取首页数据
Vue.prototype.$onLaunched = new Promise(resolve => { 
    Vue.prototype.$isResolve = resolve;
})

App.mpType = 'app'
Vue.mixin(share)

const app = new Vue({
	...App
})
app.$mount()
